

using System;
using System.Collections.Generic;
using System.Text;
using DataAccessLayer;
using EntityLayer;
using DataLayer;
using System.Data;
using InfraStructureLayer;

namespace BusinessLayer
{
    public class busLanguages : BusinessBase
    {
        public busLanguages()
            : base()
        {
        }
        #region  Code Factory Generated Methods
        public void DeleteLanguagesByLanguageId(entLanguages parEntLanguages)
        {
            DbConnector insDbConnector = new DbConnector();
            try
            {
                datLanguages insDatLanguages = new datLanguages();
                insDatLanguages.DeleteLanguagesByLanguageId(parEntLanguages, insDbConnector);
            }
            catch (SFException ex)
            {
                this.ErrorMessage = ex.Message;
            }
        }
        public void InsertLanguages(entLanguages parEntLanguages)
        {
            datLanguages insDatLanguages = null;
            DbConnector insDbConnector = new DbConnector();
            try
            {
                insDatLanguages = new datLanguages();
                if (insDatLanguages.CheckLanguagesExists(parEntLanguages, insDbConnector))
                {
                    throw new SFBusinessException(GetErrorMessageMultilanguageString(11, new object[] { }));
                }
                insDatLanguages.InsertLanguages(parEntLanguages, insDbConnector);
            }
            catch (SFException ex)
            {
                this.ErrorMessage = ex.Message;
            }
        }
        public void UpdateLanguagesByLanguageId(entLanguages parEntLanguages)
        {

            datLanguages insDatLanguages = null;
            DbConnector insDbConnector = new DbConnector();
            try
            {
                insDatLanguages = new datLanguages();
                if (insDatLanguages.CheckLanguagesExists(parEntLanguages, insDbConnector))
                {
                    throw new SFBusinessException(GetErrorMessageMultilanguageString(11, new object[] { }));
                }
                insDatLanguages.UpdateLanguagesByLanguageId(parEntLanguages, insDbConnector);
            }
            catch (SFException ex)
            {
                this.ErrorMessage = ex.Message;
            }
        }
        public DataTable SelectLanguages()
        {
            try
            {
                datLanguages insDatLanguages = new datLanguages();
                DbConnector insDbConnector = new DbConnector();
                return insDatLanguages.SelectLanguages(insDbConnector);
            }
            catch (SFException ex)
            {
                this.ErrorMessage = ex.Message;
            }
            return null;
        }
        public void SelectLanguagesByLanguageId(entLanguages parEntLanguages)
        {
            try
            {
                datLanguages insDatLanguages = new datLanguages();
                DbConnector insDbConnector = new DbConnector();
                insDatLanguages.SelectLanguagesByLanguageId(parEntLanguages, insDbConnector);
            }
            catch (SFException ex)
            {
                this.ErrorMessage = ex.Message;
            }
        }

        #endregion
    }
}